package com.wh.exception;

/**
 * 描述： 异常枚举
 */
public enum SytExceptionEnum {
    NEED_OTHER_NAME(10001,"用户名已存在"),
    NEED_USER_PASSWORD(10002,"密码不能为空"),
    PASSWORD_TOO_SHORT(10003,"密码长度不能小于8位"),
    NAME_EXISTED(10004,"不允许重名，注册失败"),
    INSERT_FAILED(10005,"插入失败，请重试"),
    WRONG_PASSWORD(10006,"密码错误"),
    NEED_LOGIN(10007,"用户未登录"),
    UPDATE_FAILD(10008,"更新失败"),
    NEED_ADMIN(10009,"无管理员权限"),
    CANSHU_NOT_NULL(10010,"参数不能为空"),
    CREATE_FILED(10011,"新增失败"),
    REQUEST_PARAM_ERROR(10012,"参数格式不正确"),
    DELETE_FILED(10013,"删除失败"),
    MAKEDIR_FILED(100014,"文件夹创建失败"),
    UPLOAD_FILED(10015,"图片上传失败"),
    NOT_SALE(10016,"商品不可售状态"),
    NOT_ENOUGH(10017,"商品库存不足"),
    CART_EMPTY(10018,"购物车已勾选的商品为空"),
    NO_ENUM(10019,"未找到对应的枚举类"),
    NO_ORDER(10020,"订单不存在"),
    NOT_YOUR_ORDER(10021,"订单不属于你"),
    WRONG_ORDER_STATUS(10022,"订单状态不符"),
    WRONG_STATUS(10023,"账户被禁"),
    TOKEN_FAILD(10024,"token认证失败"),
    MOBILE_WRONG(10025,"手机号格式不对"),
    NEED_OTHER_MOBILE(10026,"该手机号已注册，不允许重复注册"),
    NEED_MOBILE(10026,"该手机号未注册，请前去注册"),
    NEED_RELOGIN(10027,"token过期，请重新登录"),
    SYSTEM_ERROR(20000,"系统异常");

    //异常码
    Integer code;
    //异常信息
    String msg;

    SytExceptionEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
